package database;
import jdbc.*;

/**
 * 单独方法类，独立运行，用来初始化数据库
 * @author bo
 *
 */
public class Initial {
	public static final String PATH = "F:/Desktop/Learn/Java/final/Info/initial/";
	
	static JdbcDao mysql;
	
	public static void main(String args[]) {
		mysql = new JdbcDao();
		String sql = "LOAD DATA INFILE '" + PATH + "users' REPLACE INTO TABLE users CHARACTER SET UTF8 " +
		"FIELDS TERMINATED BY ','";
		mysql.excuteCommand(sql);
		
		String sql2 = "LOAD DATA INFILE '" + PATH + "classlist' REPLACE INTO TABLE classes CHARACTER SET UTF8 " +
				"FIELDS TERMINATED BY ','";
		mysql.excuteCommand(sql2);
	}
}

